#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:do_listdir.py
# author:Jackiex
# datetime:2023/4/20 15:18
# software: PyCharm

"""
this is function  description 
"""

import os

# 列出指定目录下的所有文件
# files 里面既包含文件名也包含目录名

path = 'D:\\'
print(os.listdir(path))

files_and_dirs = os.listdir('D:\\dev_soft')
# 一般来说会用一个for循环来逐个判断

print('D:\dev_soft文件夹下:')
for name in files_and_dirs:
    print(name)
